package com.baidu.Chapter02;

import java.util.Scanner;

public class ex2_13 {
    public static void main(String[] args) {
        System.out.print("Enter the monthly saving amount：");
        Scanner sc=new Scanner(System.in);
        double dollar=sc.nextDouble();
        double account=0;
        for (int i = 0; i < 6; i++) {
            account=(dollar+account)*(1+0.00417);
        }
        System.out.printf("After the sixth month, the account value is $%.2f\n",account);
    }
}
